/**
 * Created by Miao on 2016/4/29.
 */
angular.module("weChat.routes", [])
    .config(function ($stateProvider, $urlRouterProvider) {
        $stateProvider
            .state("login", {
                url: "/login",
                templateUrl: "templates/login.html",
                controller:"loginController"
            })
            .state("tab", {
                url: "/tab",
                abstract: true,
                templateUrl: "templates/tabs.html"
            })
            .state("tab.message", {
                url: "/message",
                views: {
                    "tab-message": {
                        templateUrl: "templates/tab-message.html",
                        controller: "messageController"
                    }
                },
                authStatus: false
            })
            .state("tab.friends", {
                url: "/friends",
                views: {
                    "tab-friends": {
                        templateUrl: "templates/tab-friends.html"
                    }
                },
                authStatus: false
            })
            .state("tab.find", {
                url: "/find",
                views: {
                    "tab-find": {
                        templateUrl: "templates/tab-find.html"
                    }
                },
                authStatus: false
            })
            .state("tab.setting", {
                url: "/setting",
                views: {
                    "tab-setting": {
                        templateUrl: "templates/tab-setting.html"
                    }
                },
                authStatus: false
            });
        $urlRouterProvider.otherwise("/login");
    });
